﻿using System;
using System.ComponentModel.DataAnnotations;
namespace Manager.Model.Admin
{
    /// <summary>
    /// M_User:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class M_User
    {
        public M_User()
        { }
        #region Model
        private int _userid;
        private string _username;
        private string _usernickname;
        private string _userpwd;
        private string _userimage;
        private bool _usergender = true;
        private string _useremail;
        private string _usertel;
        private DateTime? _userregdate = DateTime.Now;
        private string _useripaddr;
        private int? _useraddrprovince;
        private int? _useraddrcity;
        private int? _useraddrdistrict;
        private bool _isvalid = true;
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="会员编号")]
        public int UserID
        {
            set { _userid = value; }
            get { return _userid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "姓名")]
        public string UserName
        {
            set { _username = value; }
            get { return _username; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "用户名")]
        [Required]
        [StringLength(50)]
        public string UserNickName
        {
            set { _usernickname = value; }
            get { return _usernickname; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "密码")]
        [Required]
        [StringLength(50)]
        public string UserPwd
        {
            set { _userpwd = value; }
            get { return _userpwd; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "头像")]
        public string UserImage
        {
            set { _userimage = value; }
            get { return _userimage; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "性别")]
        public bool UserGender
        {
            set { _usergender = value; }
            get { return _usergender; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "邮箱")]
        [StringLength(50)]
        [RegularExpression(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "请输入正确的邮箱地址")]
        public string UserEmail
        {
            set { _useremail = value; }
            get { return _useremail; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "联系方式")]
        [StringLength(50)]
        [RegularExpression(@"(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}", ErrorMessage = "请输入正确的电话号码")]
        public string UserTel
        {
            set { _usertel = value; }
            get { return _usertel; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "注册时间")]
        public DateTime? UserRegDate
        {
            set { _userregdate = value; }
            get { return _userregdate; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "IP地址")]
        public string UserIPAddr
        {
            set { _useripaddr = value; }
            get { return _useripaddr; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "省")]
        public int? UserAddrProvince
        {
            set { _useraddrprovince = value; }
            get { return _useraddrprovince; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "市")]
        public int? UserAddrCity
        {
            set { _useraddrcity = value; }
            get { return _useraddrcity; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name = "区")]
        public int? UserAddrDistrict
        {
            set { _useraddrdistrict = value; }
            get { return _useraddrdistrict; }
        }
        /// <summary>
        /// 
        /// </summary>
        [Display(Name="是否有效")]
        public bool IsValid
        {
            set { _isvalid = value; }
            get { return _isvalid; }
        }
        #endregion Model

    }
}

